package com.asgard.crypto;

public class CryptoService {
    private static boolean USE_SM = false;

    public static CryptoServiceProvider get() {
        if (USE_SM) {
            return SMCryptoService.getInstance();
        } else {
            return ClassicCryptoService.getInstance();
        }
    }

    public static CryptoServiceProvider get(boolean useSM) {
        if (useSM) {
            return SMCryptoService.getInstance();
        } else {
            return ClassicCryptoService.getInstance();
        }
    }
    
    public static void setUseSM(boolean useSM) {
        USE_SM = useSM;
    }

    public static boolean useSM() {
        return USE_SM;
    }
}
